
func void B_RaiseRealAttributeLearnCounter(var C_Npc oth,var int attrib,var int points)
{
	if(attrib == ATR_STRENGTH)
	{
		oth.aivar[REAL_STRENGTH] = oth.aivar[REAL_STRENGTH] + points;
	}
	else if(attrib == ATR_DEXTERITY)
	{
		oth.aivar[REAL_DEXTERITY] = oth.aivar[REAL_DEXTERITY] + points;
	}
	else if(attrib == ATR_MANA_MAX)
	{
		oth.aivar[REAL_MANA_MAX] = oth.aivar[REAL_MANA_MAX] + points;
	};
};

func void B_RaiseAttribute(var C_Npc oth,var int attrib,var int points)
{
	var string concatText;
	if(attrib == ATR_STRENGTH)
	{
		oth.attribute[ATR_STRENGTH] = oth.attribute[ATR_STRENGTH] + points;
		concatText = ConcatStrings(PRINT_LearnSTR,IntToString(points));
		PrintScreen(concatText,-1,-1,FONT_Screen,2);
		if(oth.attribute[ATR_STRENGTH] >= 300)
		{
			Mdl_SetModelFatness(oth,3);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 250)
		{
			Mdl_SetModelFatness(oth,2.5);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 200)
		{
			Mdl_SetModelFatness(oth,2);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 150)
		{
			Mdl_SetModelFatness(oth,1.5);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 100)
		{
			Mdl_SetModelFatness(oth,1);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 50)
		{
			Mdl_SetModelFatness(oth,0.5);
		};
	};
	if(attrib == ATR_DEXTERITY)
	{
		oth.attribute[ATR_DEXTERITY] = oth.attribute[ATR_DEXTERITY] + points;
		concatText = ConcatStrings(PRINT_LearnDEX,IntToString(points));
		PrintScreen(concatText,-1,-1,FONT_Screen,2);
	};
	if(attrib == ATR_MANA_MAX)
	{
		oth.attribute[ATR_MANA_MAX] = oth.attribute[ATR_MANA_MAX] + points;
		concatText = ConcatStrings(PRINT_LearnMANA_MAX,IntToString(points));
		PrintScreen(concatText,-1,-1,FONT_Screen,2);
	};
	if(attrib == ATR_HITPOINTS_MAX)
	{
		oth.attribute[ATR_HITPOINTS_MAX] = oth.attribute[ATR_HITPOINTS_MAX] + points;
		concatText = ConcatStrings(PRINT_Learnhitpoints_MAX,IntToString(points));
		PrintScreen(concatText,-1,-1,FONT_Screen,2);
	};
	B_RaiseRealAttributeLearnCounter(oth,attrib,points);
};

func void b_raiseattributemany(var C_Npc oth,var int attrib,var int points)
{
	if(attrib == ATR_STRENGTH)
	{
		oth.attribute[ATR_STRENGTH] = oth.attribute[ATR_STRENGTH] + points;
		if(oth.attribute[ATR_STRENGTH] >= 300)
		{
			Mdl_SetModelFatness(oth,3);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 250)
		{
			Mdl_SetModelFatness(oth,2.5);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 200)
		{
			Mdl_SetModelFatness(oth,2);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 150)
		{
			Mdl_SetModelFatness(oth,1.5);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 100)
		{
			Mdl_SetModelFatness(oth,1);
		}
		else if(oth.attribute[ATR_STRENGTH] >= 50)
		{
			Mdl_SetModelFatness(oth,0.5);
		};
	};
	if(attrib == ATR_DEXTERITY)
	{
		oth.attribute[ATR_DEXTERITY] = oth.attribute[ATR_DEXTERITY] + points;
	};
	if(attrib == ATR_MANA_MAX)
	{
		oth.attribute[ATR_MANA_MAX] = oth.attribute[ATR_MANA_MAX] + points;
	};
	if(attrib == ATR_HITPOINTS_MAX)
	{
		oth.attribute[ATR_HITPOINTS_MAX] = oth.attribute[ATR_HITPOINTS_MAX] + points;
	};
	B_RaiseRealAttributeLearnCounter(oth,attrib,points);
};

func void b_raiseattributeminus(var C_Npc oth,var int attrib,var int points)
{
	var string concatText;
	if(attrib == ATR_STRENGTH)
	{
		oth.attribute[ATR_STRENGTH] = oth.attribute[ATR_STRENGTH] + points;
	};
	if(attrib == ATR_DEXTERITY)
	{
		oth.attribute[ATR_DEXTERITY] = oth.attribute[ATR_DEXTERITY] + points;
	};
	if(attrib == ATR_MANA_MAX)
	{
		oth.attribute[ATR_MANA_MAX] = oth.attribute[ATR_MANA_MAX] + points;
	};
	if(attrib == ATR_HITPOINTS_MAX)
	{
		oth.attribute[ATR_HITPOINTS_MAX] = oth.attribute[ATR_HITPOINTS_MAX] + points;
	};
	B_RaiseRealAttributeLearnCounter(oth,attrib,points);
};

